package com.adcc.loadsheet.billing.mapper.mysql.contractuser;

import com.adcc.loadsheet.billing.entity.contractuser.ContractUserAirlinesEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 合同用户和航司关联表（计费范围）Mapper
 * Created by zhaoml on 2020-04-14.
 */
@Mapper
public interface ContractUserAirlinesEntityMapper {

    //根据合同用户删除
    int deleteByContractUserId(Integer contractUserId);

    //批量新建合同用户-航司关联关系
    void insertByBatch(@Param("contractUserId") Integer contractUserId, @Param("airlineIds") String airlineIds);

    //查询与合同用户绑定的航司
    List<Integer> selectAirlineIds(Integer contractUserId);

    //查询与航司和合同用户绑定的数据
    List<ContractUserAirlinesEntity> selectContractUserIds(@Param("airlineId")Integer airlineId, @Param("contractUserId")Integer contractUserId);
}